package Kaobeishen;

public  class  Student implements Cloneable{
    String name;
    int studentId;
    Address address;
    public Student(String name,int studentId,Address address){
        this.name = name;
        this.studentId = studentId;
        this.address = address;
    }
    @Override
    public Object clone() throws CloneNotSupportedException{
        Student clonedStudent = (Student) super.clone();
        clonedStudent.address = (Address) this.address.clone();
        return  clonedStudent;
    }
}

